<!--{if $opration=='addnew'||$opration=='edit'}-->
{include file='libs/category_info.htm'}
<!--{else}-->
<div class="main-div">
  <div class="toolbar">
		<span class="btn btn-dft" onclick="Location('index.php?action={$action}&opration=addnew')" onmouseup="this.className='btn btn-hover'" onmousedown="this.className='btn btn-active'" onmouseover="this.className='btn btn-hover'" onmouseout="this.className='btn btn-dft'" tabindex="0"><span>{$lang.category_addnew}</span></span>
		<span class="btn btn-dft" onclick="window.location.reload()" onmouseup="this.className='btn btn-hover'" onmousedown="this.className='btn btn-active'" onmouseover="this.className='btn btn-hover'" onmouseout="this.className='btn btn-dft'" tabindex="0"><span>{$lang.refresh}</span></span>
  </div>
  <table border="0" cellspacing="0" cellpadding="0" class="list">
    <tr>
      <th width="240">{$lang.category_name}</th>
	  <th width="20" class="tocenter"><img src="images/icon_view.gif" border="0" width="16" height="16" /></th>
      <th width="40" class="tocenter" style="cursor:pointer;" onclick="window.location.reload()" title="{$lang.click_resort}">{$lang.sort}</th>
	  <th width="40" class="tocenter">{$lang.category_disabled}</th>
      <th class="last">{$lang.keywords}</th>
    </tr>
	<!--{foreach from=$categories.0 item=aa}-->
    <tr onmouseover="this.className='active'" onmouseout="this.className=''">
      <td onmouseover="showMenuBox({$aa.cid})" onmouseout="hideMenuBox({$aa.cid})">
	      <img src="images/menu_minus.gif" border="0" align="absmiddle" width="9" height="9" /> 
	      <b><span title="{$lang.click_edit}" onclick="Edit(this,'opration=edit_name&cid={$aa.cid}')">{$aa.name}</span></b> [ID:{$aa.cid}] 
	      <span class="c_box" id="box_{$aa.cid}">
			  <b class="icon-edit" tabindex="0" title="{$lang.edit}" onclick="Location('index.php?action={$action}&opration=edit&cid={$aa.cid}')"></b>
			  <b class="icon-drop" tabindex="0" title="{$lang.drop}" onclick="DropOne({$aa.cid})"></b>
			  <b class="icon-add" tabindex="0" title="{$lang.add}" onclick="Location('index.php?action={$action}&opration=addnew&cup={$aa.cid}')"></b>
		  </span>
	  </td>
	  <td class="tocenter"><a href="{$aa.caturl}" target="_blank"><img src="images/icon_view.gif" title="{$lang.view}" border="0" width="16" height="16" /></a></td>
      <td class="tocenter"><span title="{$lang.click_edit}" onclick="Edit(this,'opration=edit_order&cid={$aa.cid}')">{$aa.displayorder}</span></td>
      <td class="tocenter"><img src="images/{if $aa.disabled==0}yes.gif{else}no.gif{/if}" border="0" title="{$lang.click_switch}" onclick="toggle2(this,'opration=toggle_disabled&cid={$aa.cid}')" /></td>
	  <td><span title="{$lang.click_edit}" onclick="Edit(this,'opration=edit_kw&cid={$aa.cid}')">{$aa.keywords}</span></td>
    </tr>
	<!--{assign var='sub' value=$aa.cid}-->
    <!--{foreach from=$categories.$sub item=bb}-->
    <tr onmouseover="this.className='active'" onmouseout="this.className=''">
      <td style="padding-left:20px;" onmouseover="showMenuBox({$bb.cid})" onmouseout="hideMenuBox({$bb.cid})">
	       <img src="images/menu_arrow.gif" border="0" align="absmiddle" width="9" height="9" /> 
		   <span title="{$lang.click_edit}" onclick="Edit(this,'opration=edit_name&cid={$bb.cid}')">{$bb.name}</span>  [ID:{$bb.cid}]
	       <span class="c_box" id="box_{$bb.cid}"> 
			  <b class="icon-edit" tabindex="0" title="{$lang.edit}" onclick="Location('index.php?action={$action}&opration=edit&cid={$bb.cid}')"></b>
			  <b class="icon-drop" tabindex="0" title="{$lang.drop}" onclick="DropOne({$bb.cid})"></b>
			  <b class="icon-add" tabindex="0" title="{$lang.add}" onclick="Location('index.php?action={$action}&opration=addnew&cup={$aa.cid}')"></b>
		   </span>
	  </td>
	  <td class="tocenter"><a href="{$bb.caturl}" target="_blank"><img src="images/icon_view.gif" title="{$lang.view}" border="0" width="16" height="16" /></a></td>
      <td class="tocenter"><span title="{$lang.click_edit}" onclick="Edit(this,'opration=edit_order&cid={$bb.cid}')">{$bb.displayorder}</span></td>
      <td class="tocenter"><img src="images/{if $bb.disabled==0}yes.gif{else}no.gif{/if}" border="0" title="{$lang.click_switch}" onclick="toggle2(this,'opration=toggle_disabled&cid={$bb.cid}')" /></td>
	  <td><span title="{$lang.click_edit}" onclick="Edit(this,'opration=edit_kw&cid={$bb.cid}')">{$bb.keywords}</span></td>
    </tr>
    <!--{/foreach}-->
	<!--{/foreach}-->
  </table>
  <div class="toolbar">
		<span class="btn btn-dft" onclick="Location('index.php?action={$action}&opration=addnew')" onmouseup="this.className='btn btn-hover'" onmousedown="this.className='btn btn-active'" onmouseover="this.className='btn btn-hover'" onmouseout="this.className='btn btn-dft'" tabindex="0"><span>{$lang.category_addnew}</span></span>
		<span class="btn btn-dft" onclick="window.location.reload()" onmouseup="this.className='btn btn-hover'" onmousedown="this.className='btn btn-active'" onmouseover="this.className='btn btn-hover'" onmouseout="this.className='btn btn-dft'" tabindex="0"><span>{$lang.refresh}</span></span>
  </div>
</div>
<!--{/if}-->